#include "CGameOverState.h"
#include "CGame.h"
#include "CXInput.h"
#include "CMainMenuState.h"
#include "SGD Wrappers/CSGD_Direct3D.h"
#include "SGD Wrappers/CSGD_TextureManager.h"
#include "SGD Wrappers/CSGD_DirectSound.h"
#include "SGD Wrappers/CSGD_WaveManager.h"
#include "SGD Wrappers/CSGD_DirectInput.h"

CGameOverState::CGameOverState()
{

}
CGameOverState::CGameOverState(const CGameOverState&)
{

}
CGameOverState& CGameOverState::operator=(CGameOverState&)
{

	return *this;
}
CGameOverState::~CGameOverState()
{

}
CGameOverState* CGameOverState::GetInstance()
{
	static CGameOverState instance;
	return &instance;
}
void CGameOverState::Enter()
{
	CXInput::GetInstance()->Vibrate();
}
bool CGameOverState::Input()
{
	if(CXInput::GetInstance()->IsConnected())
	{
		if(CXInput::GetInstance()->PressButton() & XINPUT_GAMEPAD_START)
		{
			CGame::GetInstance()->ChangeState(CMainMenuState::GetInstance());
		}
	}
	if(((CSGD_DirectInput::GetInstance()->KeyPressedEx(DIK_RETURN)) && (CSGD_DirectInput::GetInstance()->KeyUp(DIK_LALT))))
	{
		CGame::GetInstance()->ChangeState(CMainMenuState::GetInstance());
	}
	return true;
}
void CGameOverState::Update(float fDelta)
{

}
void CGameOverState::Render()
{
	CSGD_Direct3D::GetInstance()->DrawText("You Lose", 280, 200);
	CSGD_Direct3D::GetInstance()->DrawText("Press Enter to Continue or Start", 230, 215);
}
void CGameOverState::Exit()
{

}